//
//  CPushManager.m
//  JKServer
//
//  Created by 丁攀 on 2017/12/26.
//  Copyright © 2017年 Facebook. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CPushManager.h"
#import <React/RCTLog.h>

@implementation CPushManager

RCT_EXPORT_MODULE();

RCT_EXPORT_METHOD(bindAccount:(NSString *)account callback:(RCTResponseSenderBlock)callback)
{
  RCTLogInfo(@"Aliyun push bind account is %@", account);
  [CloudPushSDK bindAccount:(NSString *)account withCallback:^(CloudPushCallbackResult *res){
    RCTLogInfo(@"bind account callback result %@", res);
    callback(@[[NSNull null], @"test"]);
  }];
}
RCT_EXPORT_METHOD(getDeviceId:(RCTResponseSenderBlock)callback)
{
  callback(@[[NSNull null], [CloudPushSDK getDeviceId]]);
}
@end
